<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddIndexMessageReplyIdInMessageTable extends AbstractMigration
{
    public function up()
    {
        $this->table("message")
            ->addIndex(['message_reply_id'], ['type' => 'normal', 'name' => 'idx_message_reply_id'])
            ->save();
    }

    public function down()
    {
        $this->table("message")
            ->removeIndexByName("idx_message_reply_id")->save();
    }
}
